package top.jolyoulu.codegenweb.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import top.jolyoulu.codegenweb.observer.MysqlGenCodeObserver;
import top.jolyoulu.corecommon.queue.delayed.observer.DelayedTaskSubject;

/**
 * @Author: JolyouLu
 * @Date: 2023/4/15 23:09
 * @Description
 */
@Configuration
public class DelayedTaskSubjectConfig {

    @Autowired
    private DelayedTaskSubject delayedTaskSubject;

    @Autowired
    private MysqlGenCodeObserver mysqlGenCodeObserver;

    @Bean
    public void addObServer(){
        delayedTaskSubject.registerObserver(mysqlGenCodeObserver);
    }

}
